package com.bgds.sys.rbac.dao;

import com.bgds.sys.common.base.BaseDao;
import com.bgds.sys.rbac.domain.Role;
import org.springframework.data.jpa.repository.Query;

/**
 * @author lj
 */
public interface RoleDao extends BaseDao<Role,Long> {

    /**
     * 角色名称获取角色
     * @param name
     * @return
     */
    @Query(value = "select id,name from sys_role  where name=?",nativeQuery = true)
    Role findRoleByName(String name);
}
